Skip to content

build: don't apply release patches in nightly#1044

Closed
kdmccormick wants to merge 1 commit intonightlyfrom
kdmccormick/no-nightly-patches
Closed

build: don't apply release patches in nightly#1044
kdmccormick wants to merge 1 commit intonightlyfrom
kdmccormick/no-nightly-patches

Conversation

@kdmccormick
Copy link
Copy Markdown
Collaborator

@kdmccormick kdmccormick commented Apr 18, 2024

The Dockerfile applies some patches to edx-platform. These patches are only meant to work on named releases. So, the Dockerfile avoids applying the patches to Nightly by checking if EDX_PLATFORM_VERSION is "master"

However, people running Nightly will often use a branch off of edx-platform master, causing that conditional to miss, which will lead to build errors like this:

ERROR: failed to solve: process "/bin/sh -c curl -fsSL https://github.com/openedx/edx-platform/commit/ad201cd664b6c722cbefcbda23ae390c06daf621.patch | git am" did not complete successfully: exit code: 128

As a solution, we simply will remove the patches from Tutor's nightly branch. We can also remove the same conditional from Tutor's master branch.

The Dockerfile applies some patches to edx-platform. These patches are only meant to work on named releases. So, the Dockerfile avoids applying the patches to Nightly by checking if EDX_PLATFORM_VERSION is "master" 

However, people running Nightly will often use a *branch off of master*, which will lead to build errors like this:

> ERROR: failed to solve: process "/bin/sh -c curl -fsSL https://github.com/openedx/edx-platform/commit/ad201cd664b6c722cbefcbda23ae390c06daf621.patch | git am" did not complete successfully: exit code: 128

As a solution, we simply will remove the patches from Tutor's nightly branch. We can also remove the same conditional from Tutor's master branch.
@regisb
Copy link
Copy Markdown
Contributor

regisb commented Apr 18, 2024

This is not a super robust solution, as it means we need to open a PR in nightly each time a patch lands in master. I suggest instead to define a IS_NIGHTLY variable (I'm open to other names): note that this variable would not be a configuration setting, but a variable available at template rendering time.

Then we can replace {%- elif EDX_PLATFORM_VERSION == "master" %} by {%- elif IS_NIGHTLY %}.

@kdmccormick kdmccormick self-assigned this Apr 18, 2024
@kdmccormick
Copy link
Copy Markdown
Collaborator Author

Sounds good! I presume that it's OK to determine the value of IS_NIGHTLY by looking at tutor.__about__.__app__.__version_suffix__? I can take care of that.

@kdmccormick
Copy link
Copy Markdown
Collaborator Author

Closed in favor of #1153

@kdmccormick kdmccormick closed this Nov 7, 2024
@kdmccormick kdmccormick deleted the kdmccormick/no-nightly-patches branch November 7, 2024 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Won't fix

Development

Successfully merging this pull request may close these issues.

2 participants